<?php
/**
 * @package PHPKit.
 * @author: mawenpei
 * @date: 2016/12/2
 * @time: 9:38
 */
namespace HuoKit\HuoServer\Core;

class Command
{
    /**
     * 命令入参值
     * @var null
     */
    public $data = null;

    /**
     * 命令名
     * @var null
     */
    public $command = '';

    /**
     * 命令返回值
     * @var null
     */
    public $result = null;


    public function __construct($command, $data)
    {

        $this->data = $data;
        $this->command = $command;

    }


    public function getResult()
    {
        return $this->result;
    }

    public function setResult($result)
    {
        $this->result = $result;
    }

    public function getCommand()
    {
        return $this->command;
    }

    public function getData()
    {
        return $this->data;
    }


    public function __toString()
    {
        return serialize($this);
    }
}